Repository navigation
feat(library): Library page with asset thumbnails (T-J1, T-J2) - #441
Merged
Merged
Conversation
…sion Thumbnails live in a Modly-owned folder keyed by a hash of workspace dir + path, with the file's mtime and size in the name, so an edited mesh misses the cache. Library entries carry thumbnailUrl when the current version is cached, and pruning drops thumbnails of deleted or changed meshes.
…/save IPC A privileged custom scheme works for both the dev-server and packaged renderer origins, and only resolves file names from the cache. Deleting a job also drops its thumbnail.
The renderer draws each mesh with Viewer3D's default rig in a single offscreen WebGL context, one at a time, whenever a mesh reaches the viewer (generation, import, edits, library opens) and for library entries still missing one. three.js is loaded lazily so it stays out of the entry chunk.
# Conflicts: # package.json
…epaint The render queue reports each thumbnail it ends a request with; the service records it by workspace path in a small zustand store. A tile reads its own key, so a background render repaints that tile without re-listing the library.
…page selectLibraryEntries reuses the Generate picker's visibility, search and sort rules and adds capability and source-scope filters, as one flat list. gridWindow holds the windowing math (columns, visible rows, reveal on keyboard moves). openAssetLibraryEntry factors the picker's open flow so another page can open an entry in Generate.
The test imports ./pageRegistry without an extension, so the plain node --test pass could not resolve it.
New Library page (group manage) listing workspace assets as square thumbnail tiles or a compact list, with search, source-scope and type filters, sort, and a grid/list toggle. Only the rows near the viewport are mounted, so large workspaces scroll at constant cost. Tiles without a thumbnail show their capability icon and repaint when a background render lands; unopenable entries stay dimmed with their reason. Double-click (or Enter, or the status-bar button) opens the asset in Generate.
The Generate library popover stays a compact picker, now with an Open Library link, and opens entries through the shared openAssetLibraryEntry flow.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a Library page: a thumbnail grid of every workspace asset, plus the thumbnail pipeline behind it (T-J1 + T-J2).
Refs #406, #407
Thumbnails (T-J1)
Viewer3D's default look (background, lights, fov, camera direction, ACES, sRGB). This avoids a headless GL setup in Python.src/shared/thumbnails/) renders one mesh at a time. three.js is lazy-loaded, so the main bundle stays small.userData/thumbnails/. The cache key is workspace dir + path + mtime/size + render revision, so each file version is rendered at most once. A failed version is not retried until the file changes.modly-thumb://scheme, added to the CSPimg-src.thumbnailUrl.Library page (T-J2)
src/areas/library/LibraryPage.tsx, registered in the page registry (Manage group)./focuses, Esc clears);openAssetLibraryEntryhelper. Arrow keys move the selection.Known limits
Test plan
npm run lintnpm run test:node: 285 + 218 pass, 0 fail (new tests for the cache, queue, store, filters and grid windowing)npm run buildnpm run dev: